<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>发送文档</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	function selectContacts(){
		var arr = showModalDialog("<%=request.getContextPath()%>/PersionFile.do?method=selectUser", "", "dialogWidth:550pt;dialogHeight:400pt;help:0;status:0");
		if(arr != null){
			var sendedFileReceiverId = document.form1.sendedFileReceiverId.value;
			var perFileName = document.form1.perFileName.value;
			if(sendedFileReceiverId == null)
				sendedFileReceiverId = "";
			if(perFileName == null)
				perFileName = "";
			for(var i = 0; i < arr.length; i++){
				var arrT = arr[i];
				if(sendedFileReceiverId.indexOf(arrT[0]) < 0){
					sendedFileReceiverId += arrT[0] + ",";
					perFileName += arrT[1] + ";";
				}
			}
			document.form1.sendedFileReceiverId.value = sendedFileReceiverId;
			document.form1.perFileName.value = perFileName;
	  	}
    }
    
    function clearContacts(){
            document.form1.sendedFileReceiverId.value = "";
			document.form1.perFileName.value = "";
    }
    
  	function check(){
		var frm = document.form1;
		if(frm.perFileName.value == ""){
			alert("请选择收件人！");
			frm.perFileName.focus();
			return false;
		}
	}
</script>
</head>

<body>
<jsp:include page="/admin/userFileMiddle.jsp?tag=myList"/>
<form action="<%=request.getContextPath()%>/FileInfo.do?method=send" name="form1" method="post" onsubmit="return check()">
<table width="90%">
  <tr>
    <td width="15%" align="right" class="bg_blue">收件人：</td>
    <td  width="85%">     
    <input name="perFileName" type="text" size="90" value="" onClick="javascript:selectEmployer()" readonly  value=""/> <br/><input type="button" name="Submit" value="添加发送人" onclick="javascript:selectContacts()"/> <input type="button" name="Submit" value="清空发送列表" onclick="return clearContacts()"/>
    <input name="sendedFileReceiverId" type="hidden" value="">
    </td>
  </tr>
  <tr>
    <td width="" align="right" class="bg_blue"><p>文档标题：</p>
    </td>
    <td align="left" >${mfInfo.myFileInfoFileTitle}</td>
  </tr>
  <tr>
    <td align="right" class="bg_blue">文档描述：</td>
    <td colspan="3"  align="left" valign="top">${mfInfo.myFileInfoFileDescription}
    </td>
  </tr>
  <input type="hidden" name="fileId" value="${mfInfo.myFileInfoId}"/>
    <tr>
    <td colspan="2" align="center" class="nohover"><input class="buttonsend"type="submit" name="" value="发送"/></td>
  </tr>
  </form>
</table>

</body>
</html>
